# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1alpha1ConversationSummarizationSuggestionData do
  @moduledoc """
  Conversation summarization suggestion data.

  ## Attributes

  *   `answerRecord` (*type:* `String.t`, *default:* `nil`) - The name of the answer record. Format: projects/{project}/locations/{location}/answerRecords/{answer_record}
  *   `confidence` (*type:* `number()`, *default:* `nil`) - The confidence score of the summarization.
  *   `conversationModel` (*type:* `String.t`, *default:* `nil`) - The name of the model that generates this summary. Format: projects/{project}/locations/{location}/conversationModels/{conversation_model}
  *   `metadata` (*type:* `map()`, *default:* `nil`) - A map that contains metadata about the summarization and the document from which it originates.
  *   `text` (*type:* `String.t`, *default:* `nil`) - The summarization content that is concatenated into one string.
  *   `textSections` (*type:* `map()`, *default:* `nil`) - The summarization content that is divided into sections. The key is the section's name and the value is the section's content. There is no specific format for the key or value.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :answerRecord => String.t() | nil,
          :confidence => number() | nil,
          :conversationModel => String.t() | nil,
          :metadata => map() | nil,
          :text => String.t() | nil,
          :textSections => map() | nil
        }

  field(:answerRecord)
  field(:confidence)
  field(:conversationModel)
  field(:metadata, type: :map)
  field(:text)
  field(:textSections, type: :map)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1alpha1ConversationSummarizationSuggestionData do
  def decode(value, options) do
    GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1alpha1ConversationSummarizationSuggestionData.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1alpha1ConversationSummarizationSuggestionData do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
